package com.codeye.pool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class FixedThreadPoolTest {
	public static void main(String[] args) {
		String filePath = "d:/特殊产品域名清单（客户版本）.xls";
		
		
		
		ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100);  
		for (int i = 0; i < 100; i++) {  
		    final int index = i;  
		    fixedThreadPool.execute(new Runnable() {  
		        @Override  
		        public void run() {  
		            try {  
		                System.out.println(index);  
		                Thread.sleep(2000);  
		            } catch (InterruptedException e) {  
		                // TODO Auto-generated catch block  
		                e.printStackTrace();  
		            }
		        }  
		    });  
		}
		fixedThreadPool.shutdown();
	}
}
